
var bigButton = document.querySelector(".bigButton");
bigButton.onclick = function(){
	var myinfoname = ["name","gender","highestEdu","yearsOfworking","city","phone","email"];
	var myinfo = getInfo(myinfoname,".ml-myinfo");

	var eduname = ["eduTime","school","degree","major","eduOthers"];
	var eduinfo = getInfo(eduname,".ml-edu");

	var expname = ["jobTime","company","position","jobDescribe"];
	var expinfo = getInfo(expname,".ml-exp");

	var demoname = ["demoName","demoLink","demoDescribe"];
	var demoinfo = getInfo(demoname,".mr-demo");

	var expectname = ["jobType","timeType","expectCity","expectPay","others"];
	var expectinfo = getInfo(expectname,".mr-expect");

    var skillsInfo = getSkillsInfo();

    var lstorage=window.localStorage;
    var obj1 = JSON.stringify(myinfo);
    lstorage.setItem("myinfo",obj1);
    var obj2 = JSON.stringify(eduinfo);
    lstorage.setItem("eduinfo",obj2);
    var obj3 = JSON.stringify(expinfo);
    lstorage.setItem("expinfo",obj3);
    var obj4 = JSON.stringify(demoinfo);
    lstorage.setItem("demoinfo",obj4);
    var obj5 = JSON.stringify(expectinfo);
    lstorage.setItem("expectinfo",obj5);
    var objsk = JSON.stringify(skillsInfo);
    lstorage.setItem("skillsinfo",objsk);
}
function getInfo(name,cls){
	var infos = [];
	var Box = document.querySelector(cls);
	var wrapBox = Box.querySelectorAll(".wrapbox");
	for(var i=0;i<wrapBox.length;i++){
		infos[i] = getEduValue(wrapBox[i],name);
	}
	return infos;
}
function getSkillsInfo(){
    var oSkillsName = document.querySelectorAll(".skillsName");
    var oSkillsValue = document.querySelectorAll(".skillsValue");
    var oSkillsDesc = document.querySelectorAll(".skillsDesc");
    var skillsInfo = [];
    var skillsnames = [];
    var skillsvalues = [];
    var skillsdesc = [];
    for(var i=0;i<oSkillsName.length;i++){
        skillsnames.push(oSkillsName[i].innerHTML);
        skillsvalues.push(oSkillsValue[i].innerHTML);
        skillsdesc.push(oSkillsDesc[i].innerHTML);
    }
    skillsInfo.push(skillsnames,skillsvalues,skillsdesc);
    return skillsInfo;
}
